SftTree/NET 2.0

FindText Method, SftTree Class

Softel vdm, Inc.

Searches the Text property of cells for a matching string.

Syntax      SftTree Class (Softelvdm.SftTreeNET)

VB   

Public Function FindText( _
     ByVal Text As String, _
     ByVal CompleteMatch As Boolean, _
     ByVal IgnoreCase As Boolean, _
     ByVal Wrap As Boolean, _
     ByVal StartItem As ItemClass, _
     ByVal ColumnIndex As Integer, _
     ByVal DepthScan As Boolean, _
     ByVal VisibleOnly As Boolean _
  ) As ItemClass

C#   

public ItemClass FindText(
     string Text,
     bool CompleteMatch,
     bool IgnoreCase,
     bool Wrap,
     ItemClass StartItem,
     int ColumnIndex,
     bool DepthScan,
     bool VisibleOnly );

C++   

public: ItemClass^ FindText(
     String^ Text,
     bool CompleteMatch,
     bool IgnoreCase,
     bool Wrap,
     ItemClass^ StartItem,
     int ColumnIndex,
     bool DepthScan,
     bool VisibleOnly );

ColumnIndex

The zero-based column index of the column to be searched. Only one column can be searched.

CompleteMatch

Defines whether the string Text must match completely (True), otherwise False and the string Text matches if the cell's Text property starts with the same text.

DepthScan

Defines whether all items (including dependent items, starting with the starting item StartItem) are searched (True), otherwise False and only sibling items of the starting item (StartItem)  are searched.

IgnoreCase

Defines whether the string comparison is case sensitive (False), otherwise True.

StartItem

Defines the item where the search starts (including).

Text

Defines the text to find.

VisibleOnly

Defines whether only visible items are searched (True), otherwise False and all items (even items whose parents are collapsed) are searched.

Wrap

Defines whether the search wraps around at the end of the items and resumes at the first item (True), otherwise False.

Return Value

The item where the first match is found or null/Nothing if no match was found.

Comments

The FindText method searches the Text property of cells for a matching string.

The FindText method searches all cells in column ColumnIndex, starting at the item defined by StartItem for the text (Text) in each cell's CellBaseClass.Text property.

The FindItemTagObject, FindItemTagString, FindCellTagObject, FindCellTagString methods perform similar function to search items' and cells' TagObjects and TagString properties.


Feedback / comments / error reports for this topic
© 2007 - Softel vdm, Inc. - www.softelvdm.com